package cn.hua.trip.base.service.impl;

import cn.hua.trip.base.domain.StrategyDetail;
import cn.hua.trip.base.mapper.StrategyContentMapper;
import cn.hua.trip.base.mapper.StrategyDetailMapper;
import cn.hua.trip.base.query.StrategyDetailQueryObject;
import cn.hua.trip.base.service.IStrategyDetailService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StrategyDetailServiceImpl implements IStrategyDetailService {
    @Autowired
    private StrategyDetailMapper strategyDetailMapper;

    @Autowired
    private StrategyContentMapper strategyContentMapper;

    @Override
    public PageInfo query(StrategyDetailQueryObject qo) {
        PageHelper.startPage(qo.getCurrentPage(),qo.getPageSize());
        List<StrategyDetail> list = strategyDetailMapper.queryForList(qo);
        return new PageInfo(list);
    }
}
